package org.example.controller;

import io.swagger.annotations.Api;
import org.example.annotation.mySystemlog;
import org.example.domain.result.ResponseResult;
import org.example.service.OssUploadService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

@RestController
@Api(tags = "上传接口")
public class UploadController {
    @Autowired
    private OssUploadService ossUploadService;

    @PostMapping("/upload")
    @mySystemlog(businessName = "上传头像")
    public ResponseResult uploadImg(MultipartFile img){
        return ossUploadService.uploadImg(img);
    }
}
